/**
 */
package BlipTGG.Rules.impl;

import BlipLanguage.BlipApplication;
import BlipLanguage.BlipLanguageFactory;
import BlipLanguage.BlipModel;
import BlipLanguage.BlipModelAttribute;

import BlipTGG.BlipTGGFactory;
import BlipTGG.MApplicationToApplication;
import BlipTGG.MModelAttributeToModelAttribute;
import BlipTGG.MModelToModel;

import BlipTGG.Rules.MModelAttributeToModelAttributeRule;
import BlipTGG.Rules.RulesPackage;

import MocaTree.Attribute;
import MocaTree.MocaTreeFactory;
import MocaTree.Node;

import TGGLanguage.csp.*;

import TGGRuntime.Edge;
import TGGRuntime.IsApplicableMatch;
import TGGRuntime.IsApplicableRuleResult;
import TGGRuntime.IsAppropriateRuleResult;
import TGGRuntime.Match;
import TGGRuntime.PerformRuleResult;
import TGGRuntime.TGGRuntimeFactory;

import TGGRuntime.impl.AbstractRuleImpl;

import csp.constraints.*;

import de.upb.tools.sdm.*;

import java.lang.reflect.InvocationTargetException;

import java.util.*;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EOperation;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>MModel Attribute To Model Attribute Rule</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * </p>
 *
 * @generated
 */
public class MModelAttributeToModelAttributeRuleImpl extends AbstractRuleImpl
		implements MModelAttributeToModelAttributeRule {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected MModelAttributeToModelAttributeRuleImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return RulesPackage.Literals.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PerformRuleResult perform_FWD(IsApplicableMatch isApplicableMatch) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		BlipModel blipModel = null;
		MModelToModel mModelToModel = null;
		Node modelAttributeNode = null;
		Node modelNode = null;
		Attribute typeAttr = null;
		Iterator fujaba__IterIsApplicableMatchToCsp = null;
		CSP csp = null;
		MModelAttributeToModelAttribute ma2bma = null;
		BlipModelAttribute blipModelAttribute = null;
		PerformRuleResult ruleresult = null;
		Edge ma2bma__target__blipModelAttribute = null;
		Edge ma2bma__source__modelAttributeNode = null;
		Edge modelAttributeNode__attribute__typeAttr = null;
		Edge blipModel__attributes__blipModelAttribute = null;
		Edge modelAttributeNode__parentNode__modelNode = null;

		// story node 'perform transformation'
		try {
			fujaba__Success = false;

			_TmpObject = (isApplicableMatch.getObject("blipModel"));

			// ensure correct type and really bound of object blipModel
			JavaSDM.ensure(_TmpObject instanceof BlipModel);
			blipModel = (BlipModel) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("mModelToModel"));

			// ensure correct type and really bound of object mModelToModel
			JavaSDM.ensure(_TmpObject instanceof MModelToModel);
			mModelToModel = (MModelToModel) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("modelAttributeNode"));

			// ensure correct type and really bound of object modelAttributeNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			modelAttributeNode = (Node) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("modelNode"));

			// ensure correct type and really bound of object modelNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			modelNode = (Node) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("typeAttr"));

			// ensure correct type and really bound of object typeAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			typeAttr = (Attribute) _TmpObject;
			// check object isApplicableMatch is really bound
			JavaSDM.ensure(isApplicableMatch != null);
			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// iterate to-many link attributeInfo from isApplicableMatch to csp
			fujaba__Success = false;

			fujaba__IterIsApplicableMatchToCsp = isApplicableMatch
					.getAttributeInfo().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterIsApplicableMatchToCsp.hasNext()) {
				try {
					_TmpObject = fujaba__IterIsApplicableMatchToCsp.next();

					// ensure correct type and really bound of object csp
					JavaSDM.ensure(_TmpObject instanceof CSP);
					csp = (CSP) _TmpObject;

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			if (!fujaba__Success) {
				fujaba__Success = true;
				csp = null;
			}
			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(typeAttr.getName(), "type") == 0);

			// create object ma2bma
			ma2bma = BlipTGGFactory.eINSTANCE
					.createMModelAttributeToModelAttribute();

			// create object blipModelAttribute
			blipModelAttribute = BlipLanguageFactory.eINSTANCE
					.createBlipModelAttribute();

			// assign attribute blipModelAttribute
			blipModelAttribute.setName((java.lang.String) csp
					.getAttributeVariable("blipModelAttribute", "name")
					.getValue());
			// assign attribute blipModelAttribute
			blipModelAttribute.setType((java.lang.String) csp
					.getAttributeVariable("blipModelAttribute", "type")
					.getValue());

			// create link
			ma2bma.setSource(modelAttributeNode);

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ma2bma,
					blipModelAttribute, "target");

			// create link
			blipModel.getAttributes().add(blipModelAttribute); // add link

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'collect translated elements'
		try {
			fujaba__Success = false;

			// check object blipModelAttribute is really bound
			JavaSDM.ensure(blipModelAttribute != null);
			// check object ma2bma is really bound
			JavaSDM.ensure(ma2bma != null);
			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);
			// check object typeAttr is really bound
			JavaSDM.ensure(typeAttr != null);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE.createPerformRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(true);

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					modelAttributeNode, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					ma2bma, "createdLinkElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					typeAttr, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					blipModelAttribute, "createdElements");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'bookkeeping for edges'
		try {
			fujaba__Success = false;

			// check object blipModel is really bound
			JavaSDM.ensure(blipModel != null);
			// check object blipModelAttribute is really bound
			JavaSDM.ensure(blipModelAttribute != null);
			// check object mModelToModel is really bound
			JavaSDM.ensure(mModelToModel != null);
			// check object ma2bma is really bound
			JavaSDM.ensure(ma2bma != null);
			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);
			// check object modelNode is really bound
			JavaSDM.ensure(modelNode != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// check object typeAttr is really bound
			JavaSDM.ensure(typeAttr != null);
			// check isomorphic binding between objects blipModelAttribute and blipModel 
			JavaSDM.ensure(!blipModelAttribute.equals(blipModel));

			// check isomorphic binding between objects mModelToModel and blipModel 
			JavaSDM.ensure(!mModelToModel.equals(blipModel));

			// check isomorphic binding between objects ma2bma and blipModel 
			JavaSDM.ensure(!ma2bma.equals(blipModel));

			// check isomorphic binding between objects modelAttributeNode and blipModel 
			JavaSDM.ensure(!modelAttributeNode.equals(blipModel));

			// check isomorphic binding between objects modelNode and blipModel 
			JavaSDM.ensure(!modelNode.equals(blipModel));

			// check isomorphic binding between objects typeAttr and blipModel 
			JavaSDM.ensure(!typeAttr.equals(blipModel));

			// check isomorphic binding between objects mModelToModel and blipModelAttribute 
			JavaSDM.ensure(!mModelToModel.equals(blipModelAttribute));

			// check isomorphic binding between objects ma2bma and blipModelAttribute 
			JavaSDM.ensure(!ma2bma.equals(blipModelAttribute));

			// check isomorphic binding between objects modelAttributeNode and blipModelAttribute 
			JavaSDM.ensure(!modelAttributeNode.equals(blipModelAttribute));

			// check isomorphic binding between objects modelNode and blipModelAttribute 
			JavaSDM.ensure(!modelNode.equals(blipModelAttribute));

			// check isomorphic binding between objects typeAttr and blipModelAttribute 
			JavaSDM.ensure(!typeAttr.equals(blipModelAttribute));

			// check isomorphic binding between objects ma2bma and mModelToModel 
			JavaSDM.ensure(!ma2bma.equals(mModelToModel));

			// check isomorphic binding between objects modelAttributeNode and mModelToModel 
			JavaSDM.ensure(!modelAttributeNode.equals(mModelToModel));

			// check isomorphic binding between objects modelNode and mModelToModel 
			JavaSDM.ensure(!modelNode.equals(mModelToModel));

			// check isomorphic binding between objects typeAttr and mModelToModel 
			JavaSDM.ensure(!typeAttr.equals(mModelToModel));

			// check isomorphic binding between objects modelAttributeNode and ma2bma 
			JavaSDM.ensure(!modelAttributeNode.equals(ma2bma));

			// check isomorphic binding between objects modelNode and ma2bma 
			JavaSDM.ensure(!modelNode.equals(ma2bma));

			// check isomorphic binding between objects typeAttr and ma2bma 
			JavaSDM.ensure(!typeAttr.equals(ma2bma));

			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// check isomorphic binding between objects typeAttr and modelAttributeNode 
			JavaSDM.ensure(!typeAttr.equals(modelAttributeNode));

			// check isomorphic binding between objects typeAttr and modelNode 
			JavaSDM.ensure(!typeAttr.equals(modelNode));

			// create object ma2bma__target__blipModelAttribute
			ma2bma__target__blipModelAttribute = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object ma2bma__source__modelAttributeNode
			ma2bma__source__modelAttributeNode = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object modelAttributeNode__attribute__typeAttr
			modelAttributeNode__attribute__typeAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object blipModel__attributes__blipModelAttribute
			blipModel__attributes__blipModelAttribute = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object modelAttributeNode__parentNode__modelNode
			modelAttributeNode__parentNode__modelNode = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// assign attribute modelAttributeNode__parentNode__modelNode
			modelAttributeNode__parentNode__modelNode.setName("parentNode");
			// assign attribute modelAttributeNode__attribute__typeAttr
			modelAttributeNode__attribute__typeAttr.setName("attribute");
			// assign attribute ma2bma__source__modelAttributeNode
			ma2bma__source__modelAttributeNode.setName("source");
			// assign attribute ma2bma__target__blipModelAttribute
			ma2bma__target__blipModelAttribute.setName("target");
			// assign attribute blipModel__attributes__blipModelAttribute
			blipModel__attributes__blipModelAttribute.setName("attributes");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					ma2bma__target__blipModelAttribute, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					ma2bma__source__modelAttributeNode, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					modelAttributeNode__attribute__typeAttr, "translatedEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					blipModel__attributes__blipModelAttribute, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					modelAttributeNode__parentNode__modelNode,
					"translatedEdges");

			// create link
			modelAttributeNode__parentNode__modelNode.setTrg(modelNode);

			// create link
			modelAttributeNode__parentNode__modelNode
					.setSrc(modelAttributeNode);

			// create link
			ma2bma__source__modelAttributeNode.setTrg(modelAttributeNode);

			// create link
			modelAttributeNode__attribute__typeAttr.setSrc(modelAttributeNode);

			// create link
			modelAttributeNode__attribute__typeAttr.setTrg(typeAttr);

			// create link
			ma2bma__target__blipModelAttribute.setSrc(ma2bma);

			// create link
			ma2bma__source__modelAttributeNode.setSrc(ma2bma);

			// create link
			blipModel__attributes__blipModelAttribute.setSrc(blipModel);

			// create link
			blipModel__attributes__blipModelAttribute
					.setTrg(blipModelAttribute);

			// create link
			ma2bma__target__blipModelAttribute.setTrg(blipModelAttribute);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// statement node 'perform postprocessing'
		// No post processing method found
		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isAppropriate_FWD(Match match, Node modelNode,
			Node modelAttributeNode, Attribute typeAttr) {
		boolean fujaba__Success = false;
		Edge modelAttributeNode__parentNode__modelNode = null;
		Edge modelAttributeNode__attribute__typeAttr = null;

		// statement node 'Solve CSP'
		// Create CSP
		CSP csp = CspFactory.eINSTANCE.createCSP();

		// Create literals

		// Create attribute variables

		// Create explicit parameters

		// Create unbound variables

		// Create constraints

		// Solve CSP

		// statement node 'Check CSP'
		fujaba__Success = csp.check();
		if (fujaba__Success) {
			// story node 'collect elements to be translated'
			try {
				fujaba__Success = false;

				// check object match is really bound
				JavaSDM.ensure(match != null);
				// check object modelAttributeNode is really bound
				JavaSDM.ensure(modelAttributeNode != null);
				// check object modelNode is really bound
				JavaSDM.ensure(modelNode != null);
				// check object typeAttr is really bound
				JavaSDM.ensure(typeAttr != null);
				// check isomorphic binding between objects modelNode and modelAttributeNode 
				JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

				// create object modelAttributeNode__parentNode__modelNode
				modelAttributeNode__parentNode__modelNode = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// create object modelAttributeNode__attribute__typeAttr
				modelAttributeNode__attribute__typeAttr = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// assign attribute modelAttributeNode__parentNode__modelNode
				modelAttributeNode__parentNode__modelNode.setName("parentNode");
				// assign attribute modelAttributeNode__attribute__typeAttr
				modelAttributeNode__attribute__typeAttr.setName("attribute");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						modelAttributeNode__parentNode__modelNode,
						"toBeTranslatedEdges");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						typeAttr, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						modelAttributeNode, "toBeTranslatedElements");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						modelAttributeNode__attribute__typeAttr,
						"toBeTranslatedEdges");

				// create link
				modelAttributeNode__parentNode__modelNode
						.setSrc(modelAttributeNode);

				// create link
				modelAttributeNode__attribute__typeAttr
						.setSrc(modelAttributeNode);

				// create link
				modelAttributeNode__attribute__typeAttr.setTrg(typeAttr);

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(
						modelAttributeNode__parentNode__modelNode, modelNode,
						"trg");
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// story node 'collect context elements'
			try {
				fujaba__Success = false;

				// check object match is really bound
				JavaSDM.ensure(match != null);
				// check object modelNode is really bound
				JavaSDM.ensure(modelNode != null);

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						modelNode, "contextNodes");
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// statement node 'register objects to match'
			match.registerObject("modelNode", modelNode);
			match.registerObject("modelAttributeNode", modelAttributeNode);
			match.registerObject("typeAttr", typeAttr);

			return true;

		} else {
			return false;

		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsApplicableRuleResult isApplicable_FWD(Match match) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsApplicableRuleResult ruleresult = null;
		Node modelAttributeNode = null;
		Node modelNode = null;
		Attribute typeAttr = null;
		IsApplicableMatch isApplicableMatch = null;
		BlipModel blipModel = null;
		Iterator fujaba__IterModelNodeToMModelToModel = null;
		MModelToModel mModelToModel = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "perform_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsApplicableRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);
			// assign attribute ruleresult
			ruleresult.setRule("MModelAttributeToModelAttributeRule");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					performOperation, "performOperation");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'core match'
		try {
			fujaba__Success = false;

			_TmpObject = (match.getObject("modelAttributeNode"));

			// ensure correct type and really bound of object modelAttributeNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			modelAttributeNode = (Node) _TmpObject;
			_TmpObject = (match.getObject("modelNode"));

			// ensure correct type and really bound of object modelNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			modelNode = (Node) _TmpObject;
			_TmpObject = (match.getObject("typeAttr"));

			// ensure correct type and really bound of object typeAttr
			JavaSDM.ensure(_TmpObject instanceof Attribute);
			typeAttr = (Attribute) _TmpObject;
			// check object match is really bound
			JavaSDM.ensure(match != null);
			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(typeAttr.getName(), "type") == 0);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'find context'
		try {
			fujaba__Success = false;

			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);
			// check object modelNode is really bound
			JavaSDM.ensure(modelNode != null);
			// check object typeAttr is really bound
			JavaSDM.ensure(typeAttr != null);
			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// check link attribute from typeAttr to modelAttributeNode
			JavaSDM.ensure(modelAttributeNode.equals(typeAttr.getNode()));

			// check link children from modelAttributeNode to modelNode
			JavaSDM.ensure(modelNode.equals(modelAttributeNode.getParentNode()));

			// iterate to-many link source from modelNode to mModelToModel
			fujaba__Success = false;

			fujaba__IterModelNodeToMModelToModel = new ArrayList(
					org.moflon.util.eMoflonEMFUtil.getOppositeReference(
							modelNode, MModelToModel.class, "source"))
					.iterator();

			while (fujaba__IterModelNodeToMModelToModel.hasNext()) {
				try {
					mModelToModel = (MModelToModel) fujaba__IterModelNodeToMModelToModel
							.next();

					// check object mModelToModel is really bound
					JavaSDM.ensure(mModelToModel != null);
					// bind object
					blipModel = mModelToModel.getTarget();

					// check object blipModel is really bound
					JavaSDM.ensure(blipModel != null);

					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(typeAttr.getName(),
							"type") == 0);

					// create object isApplicableMatch
					isApplicableMatch = TGGRuntimeFactory.eINSTANCE
							.createIsApplicableMatch();

					// statement node 'solve CSP'
					// Create CSP
					CSP csp = CspFactory.eINSTANCE.createCSP();
					isApplicableMatch.getAttributeInfo().add(csp);

					// Create literals

					// Create attribute variables
					Variable<String> var_modelAttributeNode_name = CspFactory.eINSTANCE
							.createVariable("modelAttributeNode.name", true,
									csp);
					var_modelAttributeNode_name.setValue(modelAttributeNode
							.getName());
					Variable<String> var_typeAttr_value = CspFactory.eINSTANCE
							.createVariable("typeAttr.value", true, csp);
					var_typeAttr_value.setValue(typeAttr.getValue());

					// Create explicit parameters

					// Create unbound variables
					Variable<String> var_blipModelAttribute_name = CspFactory.eINSTANCE
							.createVariable("blipModelAttribute.name", csp);
					Variable<String> var_blipModelAttribute_type = CspFactory.eINSTANCE
							.createVariable("blipModelAttribute.type", csp);

					// Create constraints
					Eq<String> eq = new Eq<String>();
					Eq<String> eq_0 = new Eq<String>();

					csp.getConstraints().add(eq);
					csp.getConstraints().add(eq_0);

					// Solve CSP
					eq.setRuleName("");
					eq.solve(var_modelAttributeNode_name,
							var_blipModelAttribute_name);
					eq_0.setRuleName("");
					eq_0.solve(var_typeAttr_value, var_blipModelAttribute_type);

					// Snapshot pattern match on which CSP is solved
					isApplicableMatch.registerObject("modelNode", modelNode);
					isApplicableMatch.registerObject("modelAttributeNode",
							modelAttributeNode);
					isApplicableMatch.registerObject("typeAttr", typeAttr);
					isApplicableMatch.registerObject("mModelToModel",
							mModelToModel);
					isApplicableMatch.registerObject("blipModel", blipModel);

					// statement node 'check CSP'
					fujaba__Success = csp.check();
					if (fujaba__Success) {
						// story node 'add match to rule result'
						try {
							fujaba__Success = false;

							// check object isApplicableMatch is really bound
							JavaSDM.ensure(isApplicableMatch != null);
							// check object ruleresult is really bound
							JavaSDM.ensure(ruleresult != null);
							// assign attribute ruleresult
							ruleresult.setSuccess(true);

							// create link
							ruleresult.getIsApplicableMatch().add(
									isApplicableMatch);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}

					} else {

					}

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PerformRuleResult perform_BWD(IsApplicableMatch isApplicableMatch) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		BlipModel blipModel = null;
		BlipModelAttribute blipModelAttribute = null;
		MModelToModel mModelToModel = null;
		Node modelNode = null;
		Iterator fujaba__IterIsApplicableMatchToCsp = null;
		CSP csp = null;
		Node modelAttributeNode = null;
		Attribute typeAttr = null;
		MModelAttributeToModelAttribute ma2bma = null;
		PerformRuleResult ruleresult = null;
		Edge ma2bma__source__modelAttributeNode = null;
		Edge modelAttributeNode__attribute__typeAttr = null;
		Edge modelAttributeNode__parentNode__modelNode = null;
		Edge ma2bma__target__blipModelAttribute = null;
		Edge blipModel__attributes__blipModelAttribute = null;

		// story node 'perform transformation'
		try {
			fujaba__Success = false;

			_TmpObject = (isApplicableMatch.getObject("blipModel"));

			// ensure correct type and really bound of object blipModel
			JavaSDM.ensure(_TmpObject instanceof BlipModel);
			blipModel = (BlipModel) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("blipModelAttribute"));

			// ensure correct type and really bound of object blipModelAttribute
			JavaSDM.ensure(_TmpObject instanceof BlipModelAttribute);
			blipModelAttribute = (BlipModelAttribute) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("mModelToModel"));

			// ensure correct type and really bound of object mModelToModel
			JavaSDM.ensure(_TmpObject instanceof MModelToModel);
			mModelToModel = (MModelToModel) _TmpObject;
			_TmpObject = (isApplicableMatch.getObject("modelNode"));

			// ensure correct type and really bound of object modelNode
			JavaSDM.ensure(_TmpObject instanceof Node);
			modelNode = (Node) _TmpObject;
			// check object isApplicableMatch is really bound
			JavaSDM.ensure(isApplicableMatch != null);
			// iterate to-many link attributeInfo from isApplicableMatch to csp
			fujaba__Success = false;

			fujaba__IterIsApplicableMatchToCsp = isApplicableMatch
					.getAttributeInfo().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterIsApplicableMatchToCsp.hasNext()) {
				try {
					_TmpObject = fujaba__IterIsApplicableMatchToCsp.next();

					// ensure correct type and really bound of object csp
					JavaSDM.ensure(_TmpObject instanceof CSP);
					csp = (CSP) _TmpObject;

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			if (!fujaba__Success) {
				fujaba__Success = true;
				csp = null;
			}
			// create object modelAttributeNode
			modelAttributeNode = MocaTreeFactory.eINSTANCE.createNode();

			// create object typeAttr
			typeAttr = MocaTreeFactory.eINSTANCE.createAttribute();

			// create object ma2bma
			ma2bma = BlipTGGFactory.eINSTANCE
					.createMModelAttributeToModelAttribute();

			// assign attribute modelAttributeNode
			modelAttributeNode.setName((java.lang.String) csp
					.getAttributeVariable("modelAttributeNode", "name")
					.getValue());
			// assign attribute typeAttr
			typeAttr.setName("type");
			// assign attribute typeAttr
			typeAttr.setValue((java.lang.String) csp.getAttributeVariable(
					"typeAttr", "value").getValue());

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ma2bma,
					blipModelAttribute, "target");

			// create link
			modelAttributeNode.setParentNode(modelNode);

			// create link
			typeAttr.setNode(modelAttributeNode);

			// create link
			ma2bma.setSource(modelAttributeNode);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'collect translated elements'
		try {
			fujaba__Success = false;

			// check object blipModelAttribute is really bound
			JavaSDM.ensure(blipModelAttribute != null);
			// check object ma2bma is really bound
			JavaSDM.ensure(ma2bma != null);
			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);
			// check object typeAttr is really bound
			JavaSDM.ensure(typeAttr != null);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE.createPerformRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(true);

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					blipModelAttribute, "translatedElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					typeAttr, "createdElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					ma2bma, "createdLinkElements");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					modelAttributeNode, "createdElements");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'bookkeeping for edges'
		try {
			fujaba__Success = false;

			// check object blipModel is really bound
			JavaSDM.ensure(blipModel != null);
			// check object blipModelAttribute is really bound
			JavaSDM.ensure(blipModelAttribute != null);
			// check object mModelToModel is really bound
			JavaSDM.ensure(mModelToModel != null);
			// check object ma2bma is really bound
			JavaSDM.ensure(ma2bma != null);
			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);
			// check object modelNode is really bound
			JavaSDM.ensure(modelNode != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// check object typeAttr is really bound
			JavaSDM.ensure(typeAttr != null);
			// check isomorphic binding between objects blipModelAttribute and blipModel 
			JavaSDM.ensure(!blipModelAttribute.equals(blipModel));

			// check isomorphic binding between objects mModelToModel and blipModel 
			JavaSDM.ensure(!mModelToModel.equals(blipModel));

			// check isomorphic binding between objects ma2bma and blipModel 
			JavaSDM.ensure(!ma2bma.equals(blipModel));

			// check isomorphic binding between objects modelAttributeNode and blipModel 
			JavaSDM.ensure(!modelAttributeNode.equals(blipModel));

			// check isomorphic binding between objects modelNode and blipModel 
			JavaSDM.ensure(!modelNode.equals(blipModel));

			// check isomorphic binding between objects typeAttr and blipModel 
			JavaSDM.ensure(!typeAttr.equals(blipModel));

			// check isomorphic binding between objects mModelToModel and blipModelAttribute 
			JavaSDM.ensure(!mModelToModel.equals(blipModelAttribute));

			// check isomorphic binding between objects ma2bma and blipModelAttribute 
			JavaSDM.ensure(!ma2bma.equals(blipModelAttribute));

			// check isomorphic binding between objects modelAttributeNode and blipModelAttribute 
			JavaSDM.ensure(!modelAttributeNode.equals(blipModelAttribute));

			// check isomorphic binding between objects modelNode and blipModelAttribute 
			JavaSDM.ensure(!modelNode.equals(blipModelAttribute));

			// check isomorphic binding between objects typeAttr and blipModelAttribute 
			JavaSDM.ensure(!typeAttr.equals(blipModelAttribute));

			// check isomorphic binding between objects ma2bma and mModelToModel 
			JavaSDM.ensure(!ma2bma.equals(mModelToModel));

			// check isomorphic binding between objects modelAttributeNode and mModelToModel 
			JavaSDM.ensure(!modelAttributeNode.equals(mModelToModel));

			// check isomorphic binding between objects modelNode and mModelToModel 
			JavaSDM.ensure(!modelNode.equals(mModelToModel));

			// check isomorphic binding between objects typeAttr and mModelToModel 
			JavaSDM.ensure(!typeAttr.equals(mModelToModel));

			// check isomorphic binding between objects modelAttributeNode and ma2bma 
			JavaSDM.ensure(!modelAttributeNode.equals(ma2bma));

			// check isomorphic binding between objects modelNode and ma2bma 
			JavaSDM.ensure(!modelNode.equals(ma2bma));

			// check isomorphic binding between objects typeAttr and ma2bma 
			JavaSDM.ensure(!typeAttr.equals(ma2bma));

			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// check isomorphic binding between objects typeAttr and modelAttributeNode 
			JavaSDM.ensure(!typeAttr.equals(modelAttributeNode));

			// check isomorphic binding between objects typeAttr and modelNode 
			JavaSDM.ensure(!typeAttr.equals(modelNode));

			// create object ma2bma__source__modelAttributeNode
			ma2bma__source__modelAttributeNode = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object modelAttributeNode__attribute__typeAttr
			modelAttributeNode__attribute__typeAttr = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object modelAttributeNode__parentNode__modelNode
			modelAttributeNode__parentNode__modelNode = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object ma2bma__target__blipModelAttribute
			ma2bma__target__blipModelAttribute = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// create object blipModel__attributes__blipModelAttribute
			blipModel__attributes__blipModelAttribute = TGGRuntimeFactory.eINSTANCE
					.createEdge();

			// assign attribute modelAttributeNode__parentNode__modelNode
			modelAttributeNode__parentNode__modelNode.setName("parentNode");
			// assign attribute modelAttributeNode__attribute__typeAttr
			modelAttributeNode__attribute__typeAttr.setName("attribute");
			// assign attribute ma2bma__source__modelAttributeNode
			ma2bma__source__modelAttributeNode.setName("source");
			// assign attribute ma2bma__target__blipModelAttribute
			ma2bma__target__blipModelAttribute.setName("target");
			// assign attribute blipModel__attributes__blipModelAttribute
			blipModel__attributes__blipModelAttribute.setName("attributes");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					ma2bma__source__modelAttributeNode, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					modelAttributeNode__attribute__typeAttr, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					modelAttributeNode__parentNode__modelNode, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					ma2bma__target__blipModelAttribute, "createdEdges");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					blipModel__attributes__blipModelAttribute,
					"translatedEdges");

			// create link
			modelAttributeNode__parentNode__modelNode.setTrg(modelNode);

			// create link
			modelAttributeNode__parentNode__modelNode
					.setSrc(modelAttributeNode);

			// create link
			modelAttributeNode__attribute__typeAttr.setSrc(modelAttributeNode);

			// create link
			ma2bma__source__modelAttributeNode.setTrg(modelAttributeNode);

			// create link
			modelAttributeNode__attribute__typeAttr.setTrg(typeAttr);

			// create link
			ma2bma__source__modelAttributeNode.setSrc(ma2bma);

			// create link
			ma2bma__target__blipModelAttribute.setSrc(ma2bma);

			// create link
			blipModel__attributes__blipModelAttribute.setSrc(blipModel);

			// create link
			blipModel__attributes__blipModelAttribute
					.setTrg(blipModelAttribute);

			// create link
			ma2bma__target__blipModelAttribute.setTrg(blipModelAttribute);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// statement node 'perform postprocessing'
		// No post processing method found
		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isAppropriate_BWD(Match match, BlipModel blipModel,
			BlipModelAttribute blipModelAttribute) {
		boolean fujaba__Success = false;
		Edge blipModel__attributes__blipModelAttribute = null;

		// statement node 'Solve CSP'
		// Create CSP
		CSP csp = CspFactory.eINSTANCE.createCSP();

		// Create literals

		// Create attribute variables

		// Create explicit parameters

		// Create unbound variables

		// Create constraints

		// Solve CSP

		// statement node 'Check CSP'
		fujaba__Success = csp.check();
		if (fujaba__Success) {
			// story node 'collect elements to be translated'
			try {
				fujaba__Success = false;

				// check object blipModel is really bound
				JavaSDM.ensure(blipModel != null);
				// check object blipModelAttribute is really bound
				JavaSDM.ensure(blipModelAttribute != null);
				// check object match is really bound
				JavaSDM.ensure(match != null);
				// create object blipModel__attributes__blipModelAttribute
				blipModel__attributes__blipModelAttribute = TGGRuntimeFactory.eINSTANCE
						.createEdge();

				// assign attribute blipModel__attributes__blipModelAttribute
				blipModel__attributes__blipModelAttribute.setName("attributes");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						blipModel__attributes__blipModelAttribute,
						"toBeTranslatedEdges");

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						blipModelAttribute, "toBeTranslatedElements");

				// create link
				blipModel__attributes__blipModelAttribute
						.setTrg(blipModelAttribute);

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(
						blipModel__attributes__blipModelAttribute, blipModel,
						"src");
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// story node 'collect context elements'
			try {
				fujaba__Success = false;

				// check object blipModel is really bound
				JavaSDM.ensure(blipModel != null);
				// check object match is really bound
				JavaSDM.ensure(match != null);

				// create link
				org.moflon.util.eMoflonEMFUtil.addOppositeReference(match,
						blipModel, "contextNodes");
				fujaba__Success = true;
			} catch (JavaSDMException fujaba__InternalException) {
				fujaba__Success = false;
			}

			// statement node 'register objects to match'
			match.registerObject("blipModel", blipModel);
			match.registerObject("blipModelAttribute", blipModelAttribute);

			return true;

		} else {
			return false;

		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsApplicableRuleResult isApplicable_BWD(Match match) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsApplicableRuleResult ruleresult = null;
		BlipModel blipModel = null;
		BlipModelAttribute blipModelAttribute = null;
		IsApplicableMatch isApplicableMatch = null;
		Node modelNode = null;
		Iterator fujaba__IterBlipModelToMModelToModel = null;
		MModelToModel mModelToModel = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "perform_BWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsApplicableRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);
			// assign attribute ruleresult
			ruleresult.setRule("MModelAttributeToModelAttributeRule");

			// create link
			org.moflon.util.eMoflonEMFUtil.addOppositeReference(ruleresult,
					performOperation, "performOperation");
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'core match'
		try {
			fujaba__Success = false;

			_TmpObject = (match.getObject("blipModel"));

			// ensure correct type and really bound of object blipModel
			JavaSDM.ensure(_TmpObject instanceof BlipModel);
			blipModel = (BlipModel) _TmpObject;
			_TmpObject = (match.getObject("blipModelAttribute"));

			// ensure correct type and really bound of object blipModelAttribute
			JavaSDM.ensure(_TmpObject instanceof BlipModelAttribute);
			blipModelAttribute = (BlipModelAttribute) _TmpObject;
			// check object match is really bound
			JavaSDM.ensure(match != null);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'find context'
		try {
			fujaba__Success = false;

			// check object blipModel is really bound
			JavaSDM.ensure(blipModel != null);
			// check object blipModelAttribute is really bound
			JavaSDM.ensure(blipModelAttribute != null);
			// check link attributes from blipModelAttribute to blipModel
			JavaSDM.ensure(blipModel.equals(blipModelAttribute.eContainer()));

			// iterate to-many link target from blipModel to mModelToModel
			fujaba__Success = false;

			fujaba__IterBlipModelToMModelToModel = new ArrayList(
					org.moflon.util.eMoflonEMFUtil.getOppositeReference(
							blipModel, MModelToModel.class, "target"))
					.iterator();

			while (fujaba__IterBlipModelToMModelToModel.hasNext()) {
				try {
					mModelToModel = (MModelToModel) fujaba__IterBlipModelToMModelToModel
							.next();

					// check object mModelToModel is really bound
					JavaSDM.ensure(mModelToModel != null);
					// bind object
					modelNode = mModelToModel.getSource();

					// check object modelNode is really bound
					JavaSDM.ensure(modelNode != null);

					// create object isApplicableMatch
					isApplicableMatch = TGGRuntimeFactory.eINSTANCE
							.createIsApplicableMatch();

					// statement node 'solve CSP'
					// Create CSP
					CSP csp = CspFactory.eINSTANCE.createCSP();
					isApplicableMatch.getAttributeInfo().add(csp);

					// Create literals

					// Create attribute variables
					Variable<String> var_blipModelAttribute_name = CspFactory.eINSTANCE
							.createVariable("blipModelAttribute.name", true,
									csp);
					var_blipModelAttribute_name.setValue(blipModelAttribute
							.getName());
					Variable<String> var_blipModelAttribute_type = CspFactory.eINSTANCE
							.createVariable("blipModelAttribute.type", true,
									csp);
					var_blipModelAttribute_type.setValue(blipModelAttribute
							.getType());

					// Create explicit parameters

					// Create unbound variables
					Variable<String> var_modelAttributeNode_name = CspFactory.eINSTANCE
							.createVariable("modelAttributeNode.name", csp);
					Variable<String> var_typeAttr_value = CspFactory.eINSTANCE
							.createVariable("typeAttr.value", csp);

					// Create constraints
					Eq<String> eq = new Eq<String>();
					Eq<String> eq_0 = new Eq<String>();

					csp.getConstraints().add(eq);
					csp.getConstraints().add(eq_0);

					// Solve CSP
					eq.setRuleName("");
					eq.solve(var_modelAttributeNode_name,
							var_blipModelAttribute_name);
					eq_0.setRuleName("");
					eq_0.solve(var_typeAttr_value, var_blipModelAttribute_type);

					// Snapshot pattern match on which CSP is solved
					isApplicableMatch.registerObject("modelNode", modelNode);
					isApplicableMatch.registerObject("mModelToModel",
							mModelToModel);
					isApplicableMatch.registerObject("blipModel", blipModel);
					isApplicableMatch.registerObject("blipModelAttribute",
							blipModelAttribute);

					// statement node 'check CSP'
					fujaba__Success = csp.check();
					if (fujaba__Success) {
						// story node 'add match to rule result'
						try {
							fujaba__Success = false;

							// check object isApplicableMatch is really bound
							JavaSDM.ensure(isApplicableMatch != null);
							// check object ruleresult is really bound
							JavaSDM.ensure(ruleresult != null);
							// assign attribute ruleresult
							ruleresult.setSuccess(true);

							// create link
							ruleresult.getIsApplicableMatch().add(
									isApplicableMatch);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}

					} else {

					}

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Node_1(Node modelNode) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterModelAttributeNodeToTypeAttr = null;
		Attribute typeAttr = null;
		Iterator fujaba__IterModelNodeToModelAttributeNode = null;
		Node modelAttributeNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object modelNode is really bound
			JavaSDM.ensure(modelNode != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link children from modelNode to modelAttributeNode
			fujaba__Success = false;

			fujaba__IterModelNodeToModelAttributeNode = new ArrayList(
					modelNode.getChildren()).iterator();

			while (fujaba__IterModelNodeToModelAttributeNode.hasNext()) {
				try {
					_TmpObject = fujaba__IterModelNodeToModelAttributeNode
							.next();

					// ensure correct type and really bound of object modelAttributeNode
					JavaSDM.ensure(_TmpObject instanceof Node);
					modelAttributeNode = (Node) _TmpObject;
					// check isomorphic binding between objects modelNode and modelAttributeNode 
					JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

					// iterate to-many link attribute from modelAttributeNode to typeAttr
					fujaba__Success = false;

					fujaba__IterModelAttributeNodeToTypeAttr = new ArrayList(
							modelAttributeNode.getAttribute()).iterator();

					while (fujaba__IterModelAttributeNodeToTypeAttr.hasNext()) {
						try {
							typeAttr = (Attribute) fujaba__IterModelAttributeNodeToTypeAttr
									.next();

							// check object typeAttr is really bound
							JavaSDM.ensure(typeAttr != null);
							// attribute condition
							JavaSDM.ensure(JavaSDM.stringCompare(
									typeAttr.getName(), "type") == 0);

							// create object match
							match = TGGRuntimeFactory.eINSTANCE.createMatch();

							// statement node 'bookkeeping with generic isAppropriate method'
							fujaba__Success = this.isAppropriate_FWD(match,
									modelNode, modelAttributeNode, typeAttr);
							if (fujaba__Success) {
								// story node 'Add match to rule result'
								try {
									fujaba__Success = false;

									// check object match is really bound
									JavaSDM.ensure(match != null);
									// check object ruleresult is really bound
									JavaSDM.ensure(ruleresult != null);

									// create link
									ruleresult.getMatches().add(match);

									fujaba__Success = true;
								} catch (JavaSDMException fujaba__InternalException) {
									fujaba__Success = false;
								}

							} else {

							}

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}
					}
					JavaSDM.ensure(fujaba__Success);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Node_2(
			Node modelAttributeNode) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterModelAttributeNodeToTypeAttr = null;
		Attribute typeAttr = null;
		Node modelNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// bind object
			modelNode = modelAttributeNode.getParentNode();

			// check object modelNode is really bound
			JavaSDM.ensure(modelNode != null);

			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// iterate to-many link attribute from modelAttributeNode to typeAttr
			fujaba__Success = false;

			fujaba__IterModelAttributeNodeToTypeAttr = new ArrayList(
					modelAttributeNode.getAttribute()).iterator();

			while (fujaba__IterModelAttributeNodeToTypeAttr.hasNext()) {
				try {
					typeAttr = (Attribute) fujaba__IterModelAttributeNodeToTypeAttr
							.next();

					// check object typeAttr is really bound
					JavaSDM.ensure(typeAttr != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(typeAttr.getName(),
							"type") == 0);

					// create object match
					match = TGGRuntimeFactory.eINSTANCE.createMatch();

					// statement node 'bookkeeping with generic isAppropriate method'
					fujaba__Success = this.isAppropriate_FWD(match, modelNode,
							modelAttributeNode, typeAttr);
					if (fujaba__Success) {
						// story node 'Add match to rule result'
						try {
							fujaba__Success = false;

							// check object match is really bound
							JavaSDM.ensure(match != null);
							// check object ruleresult is really bound
							JavaSDM.ensure(ruleresult != null);

							// create link
							ruleresult.getMatches().add(match);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}

					} else {

					}

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_FWD_Attribute_4(
			Attribute typeAttr) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Node modelNode = null;
		Node modelAttributeNode = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_FWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// check object typeAttr is really bound
			JavaSDM.ensure(typeAttr != null);
			// bind object
			modelAttributeNode = typeAttr.getNode();

			// check object modelAttributeNode is really bound
			JavaSDM.ensure(modelAttributeNode != null);

			// bind object
			modelNode = modelAttributeNode.getParentNode();

			// check object modelNode is really bound
			JavaSDM.ensure(modelNode != null);

			// check isomorphic binding between objects modelNode and modelAttributeNode 
			JavaSDM.ensure(!modelNode.equals(modelAttributeNode));

			// attribute condition
			JavaSDM.ensure(JavaSDM.stringCompare(typeAttr.getName(), "type") == 0);

			// create object match
			match = TGGRuntimeFactory.eINSTANCE.createMatch();

			// statement node 'bookkeeping with generic isAppropriate method'
			fujaba__Success = this.isAppropriate_FWD(match, modelNode,
					modelAttributeNode, typeAttr);
			if (fujaba__Success) {
				// story node 'Add match to rule result'
				try {
					fujaba__Success = false;

					// check object match is really bound
					JavaSDM.ensure(match != null);
					// check object ruleresult is really bound
					JavaSDM.ensure(ruleresult != null);

					// create link
					ruleresult.getMatches().add(match);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}

			} else {

			}

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_BWD_BlipModel_0(
			BlipModel blipModel) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		Iterator fujaba__IterBlipModelToBlipModelAttribute = null;
		BlipModelAttribute blipModelAttribute = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_BWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object blipModel is really bound
			JavaSDM.ensure(blipModel != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link attributes from blipModel to blipModelAttribute
			fujaba__Success = false;

			fujaba__IterBlipModelToBlipModelAttribute = new ArrayList(
					blipModel.getAttributes()).iterator();

			while (fujaba__IterBlipModelToBlipModelAttribute.hasNext()) {
				try {
					blipModelAttribute = (BlipModelAttribute) fujaba__IterBlipModelToBlipModelAttribute
							.next();

					// check object blipModelAttribute is really bound
					JavaSDM.ensure(blipModelAttribute != null);
					// create object match
					match = TGGRuntimeFactory.eINSTANCE.createMatch();

					// statement node 'bookkeeping with generic isAppropriate method'
					fujaba__Success = this.isAppropriate_BWD(match, blipModel,
							blipModelAttribute);
					if (fujaba__Success) {
						// story node 'Add match to rule result'
						try {
							fujaba__Success = false;

							// check object match is really bound
							JavaSDM.ensure(match != null);
							// check object ruleresult is really bound
							JavaSDM.ensure(ruleresult != null);

							// create link
							ruleresult.getMatches().add(match);

							fujaba__Success = true;
						} catch (JavaSDMException fujaba__InternalException) {
							fujaba__Success = false;
						}

					} else {

					}

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public IsAppropriateRuleResult isAppropriate_BWD_BlipModelAttribute_0(
			BlipModelAttribute blipModelAttribute) {
		boolean fujaba__Success = false;
		Object _TmpObject = null;
		EClass eClass = null;
		Iterator fujaba__IterEClassToPerformOperation = null;
		EOperation performOperation = null;
		IsAppropriateRuleResult ruleresult = null;
		Match match = null;
		BlipModel blipModel = null;
		Iterator fujaba__IterRuleresultToMatch = null;

		// story node 'prepare return value'
		try {
			fujaba__Success = false;

			_TmpObject = (this.eClass());

			// ensure correct type and really bound of object eClass
			JavaSDM.ensure(_TmpObject instanceof EClass);
			eClass = (EClass) _TmpObject;
			// iterate to-many link eOperations from eClass to performOperation
			fujaba__Success = false;

			fujaba__IterEClassToPerformOperation = eClass.getEOperations()
					.iterator();

			while (!(fujaba__Success)
					&& fujaba__IterEClassToPerformOperation.hasNext()) {
				try {
					performOperation = (EOperation) fujaba__IterEClassToPerformOperation
							.next();

					// check object performOperation is really bound
					JavaSDM.ensure(performOperation != null);
					// attribute condition
					JavaSDM.ensure(JavaSDM.stringCompare(
							performOperation.getName(), "isApplicable_BWD") == 0);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// create object ruleresult
			ruleresult = TGGRuntimeFactory.eINSTANCE
					.createIsAppropriateRuleResult();

			// assign attribute ruleresult
			ruleresult.setSuccess(false);

			// create link
			ruleresult.setPerformOperation(performOperation);

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'test core match'
		try {
			fujaba__Success = false;

			// check object blipModelAttribute is really bound
			JavaSDM.ensure(blipModelAttribute != null);
			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// bind object
			blipModel = blipModelAttribute.eContainer() instanceof BlipModel ? (BlipModel) blipModelAttribute
					.eContainer() : null;

			// check object blipModel is really bound
			JavaSDM.ensure(blipModel != null);

			// check if contained via correct reference
			JavaSDM.ensure(blipModel.getAttributes().contains(
					blipModelAttribute));

			// create object match
			match = TGGRuntimeFactory.eINSTANCE.createMatch();

			// statement node 'bookkeeping with generic isAppropriate method'
			fujaba__Success = this.isAppropriate_BWD(match, blipModel,
					blipModelAttribute);
			if (fujaba__Success) {
				// story node 'Add match to rule result'
				try {
					fujaba__Success = false;

					// check object match is really bound
					JavaSDM.ensure(match != null);
					// check object ruleresult is really bound
					JavaSDM.ensure(ruleresult != null);

					// create link
					ruleresult.getMatches().add(match);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}

			} else {

			}

			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		// story node 'set success'
		try {
			fujaba__Success = false;

			// check object ruleresult is really bound
			JavaSDM.ensure(ruleresult != null);
			// iterate to-many link matches from ruleresult to match
			fujaba__Success = false;

			fujaba__IterRuleresultToMatch = ruleresult.getMatches().iterator();

			while (!(fujaba__Success)
					&& fujaba__IterRuleresultToMatch.hasNext()) {
				try {
					match = (Match) fujaba__IterRuleresultToMatch.next();

					// check object match is really bound
					JavaSDM.ensure(match != null);

					fujaba__Success = true;
				} catch (JavaSDMException fujaba__InternalException) {
					fujaba__Success = false;
				}
			}
			JavaSDM.ensure(fujaba__Success);
			// assign attribute ruleresult
			ruleresult.setSuccess(true);
			fujaba__Success = true;
		} catch (JavaSDMException fujaba__InternalException) {
			fujaba__Success = false;
		}

		return ruleresult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eInvoke(int operationID, EList<?> arguments)
			throws InvocationTargetException {
		switch (operationID) {
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___PERFORM_FWD__ISAPPLICABLEMATCH:
			return perform_FWD((IsApplicableMatch) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_FWD__MATCH_NODE_NODE_ATTRIBUTE:
			return isAppropriate_FWD((Match) arguments.get(0),
					(Node) arguments.get(1), (Node) arguments.get(2),
					(Attribute) arguments.get(3));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPLICABLE_FWD__MATCH:
			return isApplicable_FWD((Match) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___PERFORM_BWD__ISAPPLICABLEMATCH:
			return perform_BWD((IsApplicableMatch) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_BWD__MATCH_BLIPMODEL_BLIPMODELATTRIBUTE:
			return isAppropriate_BWD((Match) arguments.get(0),
					(BlipModel) arguments.get(1),
					(BlipModelAttribute) arguments.get(2));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPLICABLE_BWD__MATCH:
			return isApplicable_BWD((Match) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_FWD_NODE_1__NODE:
			return isAppropriate_FWD_Node_1((Node) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_FWD_NODE_2__NODE:
			return isAppropriate_FWD_Node_2((Node) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_FWD_ATTRIBUTE_4__ATTRIBUTE:
			return isAppropriate_FWD_Attribute_4((Attribute) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_BWD_BLIP_MODEL_0__BLIPMODEL:
			return isAppropriate_BWD_BlipModel_0((BlipModel) arguments.get(0));
		case RulesPackage.MMODEL_ATTRIBUTE_TO_MODEL_ATTRIBUTE_RULE___IS_APPROPRIATE_BWD_BLIP_MODEL_ATTRIBUTE_0__BLIPMODELATTRIBUTE:
			return isAppropriate_BWD_BlipModelAttribute_0((BlipModelAttribute) arguments
					.get(0));
		}
		return super.eInvoke(operationID, arguments);
	}

} //MModelAttributeToModelAttributeRuleImpl
